package com.ihg.hiex.entity.session.event;

import com.demo2do.core.utils.Alias;

@Alias("SessionEventType")
public enum Type {
    
    CREATE("create", "创建"),
    
    EDIT("edit", "编辑设置"),
    
    START("start", "开启"),
    
    CLOSE("close", "关闭"),
    
    DELETE("delete", "删除"),
    
    CONFIRM("confirm", "确认");

    private String description;
    
    private String alias;

    private Type(String alias , String description) {
        
        this.alias = alias;

        this.description = description;

    }
    
    /**
     * 
     * @param alias
     * @return
     */
    public static Type aliasOf(String alias) {
        
        for(Type type : Type.values()) {
            if(type.getAlias().equals(alias)) {
                
                return type;
            }
        }
        return null;
    }
    
    /**
     * 
     * @return  alias
     */
    public String getAlias() {
        return alias;
    }
    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }
    
}
